<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title></title>
    <!-- Latest compiled and minified CSS & JS -->
    <link rel="stylesheet" media="screen" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
    <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
</head>
<body>
<div class="container">
    <nav class="navbar navbar-default" role="navigation">
        <!-- Brand and toggle get grouped for better mobile display -->
        <div class="navbar-header">
            <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-ex1-collapse">
                <span class="sr-only">Toggle navigation</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
            <a class="navbar-brand" href="/admin/numbr/create">信息添加</font></a>
        </div>


    </nav>
    <div class="panel panel-default">
        <div class="panel-heading">
            <h3 class="panel-title">信息添加</h3>
        </div>
        <div class="panel-body">
            <!-- bs3-form:horizontal 新建form表单 -->
            <form action="/admin/numbr/create" enctype="multipart/form-data" method="post" class="form-horizontal" role="form">

                <div class="form-group">
                    <label  class="col-sm-2 control-label">楼栋信息:</label>
                    <div class="col-sm-10">
                        <input type="text" name="n_name"  class="form-control" value="" >
                    </div>
                </div>

                <div class="form-group">
                    <label  class="col-sm-2 control-label">楼栋地址:</label>
                    <div class="col-sm-10">
                        <input type="text" name="n_address"  class="form-control" value="" >
                    </div>
                </div>
                <div class="form-group">
                    <label  class="col-sm-2 control-label">楼栋图片:</label>
                    <div class="col-sm-10">
                        <input type="file" name="n_photo"  class="form-control" value="" >
                        <span id="wj"></span>
                    </div>
                </div>

                <div class="form-group">
                    <div class="col-sm-10 col-sm-offset-2">
                        <button type="submit" class="btn btn-primary" name="" onclick="return check()">立即添加</button>
                    </div>
                </div>
            </form>
        </div>
    </div>
</div>
<!--<script>
    function check() {
        var name = document.getElementsByName('name')[0].value;
        var age = document.getElementsByName('age')[0].value;
        var sex=document.getElementsByName("sex")[0].checked;
        var tel = document.getElementsByName('tel')[0].value;
        var cid = document.getElementsByName('cid')[0].value;
        if (name == '' || name == null) {
            xm.innerHTML = "<font color='red'>请输入用户名</font>";
            return false;
        } else if (name != '') {
            xm.innerHTML = "";
        } else {
            return true;
        }
        for(var i=0;i<=sex.length;i++) {
            if (sex == '' || sex == null) {
                xb.innerHTML = "<font color='red'>请选择性别</font>";
                return false;
                break;
            } else if (sex != '') {
                xb.innerHTML = "";
            } else {
                return true;
            }
        }
        if (age == '' || age == null) {
            nl.innerHTML = "<font color='red'>请输入年龄</font>";
            return false;
        } else if (age != '') {
            nl.innerHTML = "";
        } else {
            return true;
        }
        if (tel == '' || tel == null ||tel.length!=11) {
            dh.innerHTML = "<font color='red'>请输入11位的正确手机号</font>";
            return false;
        } else if (tel!= '') {
            dh.innerHTML = "";
        } else {
            return true;
        }
        if (cid == '' || cid == null ) {
            bj.innerHTML = "<font color='red'>请选择班级</font>";
            return false;
        } else if (cid != '') {
            bj.innerHTML = "";
        } else {
            return true;
        }
    }
</script>-->
</body>
</html>